home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
bgecho.zip
/
BIGECHO.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-09-12
|
2KB
|
89 lines
cseg segment
assume cs:cseg , ds:cseg
org 100H
enter:jmp begin
;---------------------------
db 13,'BIGECHO, Vers. 1.0 copyright by R.M.Wilson and B. Simon, 1986',10,13
db 'Usage: BIGECHO message /FB',10,13
db "Here 'message' is a string of at most 10 characters,"
db ' F and B are characters',10,13
db 'for the foreground and background'
db ' (defaults to blank and solid, i.e. / █ ).',26
foreback db 0DBH,20H
hold db 80 dup(0) ;Will hold the 8 bytes describing each of 10 characters.
;---------------------------
begin: mov si,80H ;First, get characters for use as fore and background.
lodsb
or al,al
jne lod1
ret
lod1:lodsb
cmp al,0DH
je over1
cmp al,'/'
jne lod1
lodsb
mov foreback,al
lodsb
cmp al,13
je over1
mov foreback[1],al
over1:mov si,0FA6EH ;Point ds:si to table in ROM with dot
mov ax,0F000H ;patterns for ASCII characters 0 through 127.
mov ds,ax
mov di,offset hold
mov bx,82H
form: mov al,cs:[bx] ;Load byte of message.
cmp al,0DH
je go_on
cmp al,'/'
je go_on
xor ah,ah
shl ax,1
shl ax,1
shl ax,1
push si
add si,ax
mov cx,8
rep movsb ;Get 8 bytes from ROM.
pop si
inc bx
cmp bx,8CH
jl form
go_on:push cs
pop ds
output: mov ah,2 ;We'll be using Service 2 of DOS.
xor bp,bp
loop1:mov si, offset hold
add si,bp
mov cx,10
loop2:lodsb
mov bl,80H ;8 bytes
loop3:push ax
mov dl,foreback[1]
and al,bl
jz over4
mov dl,foreback[0]
over4:int 21H
ror bl,1
pop ax
cmp bl,80H
jne loop3
add si,7
loop loop2
inc bp
cmp bp,8
jl loop1
return: ret
;-----------------------------------------------
cseg ends
end enter